home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- INDEX V1.3
-
-
- July 26, 1984
-
-
- Released to the public domain by its author for non-comercial use
- only by Gary Elfring. Copies made be made of this program pro-
- vided no charge is made for them. This product may not be sold
- or made part of any package that is sold.
-
-
- Introduction
-
- INDEX is a program that produces an index from any text
- file. It requires two input files- the text to search through
- and a list of keywords or phrases to search for. INDEX will
- handle any type of text file- including thouse produced by Word-
- Star or other word processors. INDEX was designed after I got a
- good look at MicroPro's StarIndex program. INDEX does everything
- you would expect from an index program, while StarIndex does
- little if anything.
-
- INDEX will run in a small amount of memory (64K) and will
- handle text files of any length. In operation INDEX generates
- temporary working copies of your input text and keyword files.
- These copies have the most significant bit of each character
- stripped and, depending on the option selected, all characters
- may be converted to upper case. Use of upper case only eases
- search requirements. Thus to work INDEX requires an amount of
- free disk space equal to your text file size plus keyword file
- size. More space is required if the output of INDEX is directed
- to the disk.
-
- INDEX is not the fastest program you have ever seen. It was
- written and compiled with an optimizing C compiler, however, it
- takes a fair amount of time to search large files. On a RAM disk
- a 50K file can be indexed for 100 keywords in about 8 - 10
- minutes. Time is somewhat dependent on the length of the key-
- words or phrases. NOTE- no keyword or phrase may be longer than
- 70 characters in length. Also INDEX will not locate phrases that
- wrap from one line to the next if the text being searched is
- indented- as is the case with WordStar files.
-
-
- Operation
-
- The INDEX program is easy to use. A text file is first
- created. Next a list of keywords or phrases is created as the
- next section describes. The INDEX program only needs the name of
- the text file, an the name of the keyword list. It will also
- take some simple options. To run you simply type:
-
-
-
- 1
-
-
-
-
-
-
- INDEX V1.3
-
-
- INDEX text.ext keywords.ext [opt1 opt2 opt3]{cr}
-
- NOTE: {cr} stands for the newline/enter/carriage return key.
- The [opt1 opt2 opt3] indicates optional commands that
- may be passed to the program. Up to 3 options may be
- passed. Options may be one of the following:
-
- D = redirect output to a disk file instead of the
- printer.
-
- S = redirect output to screen instead of the printer.
-
- C = instructs program to pay attention to upper and
- lower case. Use with care since 'The' is not the
- same as 'the'.
-
- xxx = where xxx is any number from 1 to 999. Instructs
- INDEX to use the supplied number as the starting
- page number. Thus you can break long blocks of
- text up and still get indexes that can be merged
- together.
-
- NOTE2: Options 'S' and 'D' may not be used together. I.E. the
- output may only be sent to one of three places, not
- both screen and disk files.
-
-
- EXAMPLES
-
- INDEX test.txt key.txt{cr}
-
- (Produce an index of file test.txt based on keyword list key.txt.
- Pay no attention to upper/lower case. Output is sent to the
- printer by default.)
-
-
- INDEX test.txt key.txt d c{cr}
-
- (Produce an index of file test.txt based on keyword list key.txt.
- Pay attention to upper and lower case. Output is sent to a disk
- file with the same name specified by the input file, but with an
- extension of ".ind". [test.ind])
-
-
- INDEX test.txt key.txt s{cr}
-
- (Produce an index of file test.txt based on keyword list key.txt.
- Pay no attention to upper/lower case. Output is sent to the
- screen.)
-
- INDEX test.txt key.txt s 24{cr}
-
- (Produce the same index as the example above, EXCEPT, page
- numbers will be offset by 24. If the first keyword was found on
-
-
- 2
-
-
-
-
-
-
- INDEX V1.3
-
-
- page 1 in the first example, then this time it will appear as if
- it was found on page 24.)
-
-
- INDEX will respond by typing out the options, if any, that
- you have specified and then printing the "Creating temporary work
- files" message. After the program has created the work files, (5
- to 10 seconds), it will proceed to the actual text file indexing.
- The program will locate the first keyword or phrase and search
- through all of you text file for it. Each matching entry will be
- sent to the output device selected by you, after the keyword
- phrase, in the form of page number - line number.
-
- All errors in file handling and creation will be caught and
- appropriate error message sent to the screen. In a trial run
- on a hard disk INDEX managed to produce an index of a 450K file
- with 120 keywords in under 3 hours and 15 minutes. Doing the job
- by hand would have taken days and produced many mistakes.
-
-
- Keyword Files
-
- The keyword files do have to be in a somewhat special format
- to work correctly. The INDEX program expects to see a single
- keyword or phrase on each line of the keyword file. INDEX also
- searches for an exact match to the keyword. Thus to find plurals
- or slight variations in spelling of a keyword or phrase it is
- best to shorten the keyword down to the lowest common set of
- characters possible. A keyword file would look something like
- this:
-
-
- Accuracy
- Assembly language
- Basic
- C
- debug
- EPROM
- jump
- High level language
- Input
-
-
- Some comments about this file are needed now. Since case is
- ignored by the program its only use is for your convience. The
- program will pay no attention to it. Locating certain words is
- quite difficult for the program. Finding C, as in the C
- programming language, can cause a problem. If just the single
- letter C is to be searched for you will get a lot of incorrect
- matches. The easy way around this is to add a space before and
- after the letter C in your keywords list. This forces the
- program to search for space-C-space{cr}, a more reliable
- indicator of the word C. Finally, to catch all references to
- debugging a program a keyword of space-DEBUG{cr} might be used.
-
-
- 3
-
-
-
-
-
-
- INDEX V1.3
-
-
- This will catch all words that start with the letters DEBUG.
- This includes debug, debugs, debugging, etc. The same rule
- applies to plurals. All extra letters should be left off
- keywords.
-
-
- Output
-
- The program output is sent to the source selected by you.
- The keyword or phrase to be searched for is printed first
- followed by a ":" and two spaces. The program will then send
- page and line number combinations out in the form PPP-LL until no
- more matches for that keyword can be found. A number like 3-45
- indicates that a match for that keyword was found on page 3, line
- 45. A sample index follows:
-
-
- Accuracy: 5-40 15-21 23-04
- Assembly language:
- Basic: 1-05 2-12 2-14 2-34 2-43 2-56 3-31
- 3-45 3-50 14-02 14-12 15-10 16-12 16-15 17-08
- 18-04 19-34 19-39
- C: 4-55 5-13
- debug: 1-13 1-45 2-33 5-45 6-54 6-55
- EPROM: 10-14
- jump: 14-13 14-23 14-56
- High level language: 12-32 13-45 15-56
- Input: 1-34 3-19 7-8
-
-
- If you are using this program and find it of value you may want
- to become a registered user. As a registered user you are enti-
- tled to the source code, updates, and help with the program.
- (The source is written in C and will be sent to the registered
- user provided he has sent a formated disk with self addressed
- stamped mailer.) A contribution of $35.00 is required to become
- a registered user. Please send same to:
-
- Gary Elfring
- 4N899 W. Mary Drive
- St. Charles, Illinois
- 60174
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
- Illinois
- 60174
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
-